package com.example.building_material_mannager.service.impl;

import com.example.building_material_mannager.entity.Factory;
import com.example.building_material_mannager.mapper.FactoryMapper;
import com.example.building_material_mannager.service.FactoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class FactoryServiceImpl implements FactoryService {
    @Resource
    FactoryMapper factoryMapper;

    @Override
    public List<Factory> showFactory(Factory factory) {
        List<Factory> factories = factoryMapper.showFactory(factory);
        return factories;
    }

    @Override
    public boolean addFactory(Factory factory) {
        boolean re=factoryMapper.addFactory(factory);
        return re;
    }

    @Override
    public boolean delFactory(Integer fid) {
        boolean re=factoryMapper.delFactory(fid);
        return re;
    }

    @Override
    public boolean upCustomer(Factory factory) {
        boolean re=factoryMapper.upFactory(factory);
        return re;
    }
}
